package com.ziyueyuwen.xiniao.util;

import com.alibaba.fastjson.JSONObject;
import com.suyeer.basic.util.LogUtil;

/**
 * @author jun 2019/4/16
 */
public class TangLangTestUtil {
    /**
     * 发送课节汇总数据
     *
     * @param args String
     */
    public static void main(String[] args) {
        try {
            JSONObject tangLangParams = new JSONObject();
            String jsonStr = "{\"ActionTime\":1555125091,\"CourseID\":9341093,\"SafeKey\":\"e57e0a79b85b8e3db3aad769664bdd53\",\"CloseTime\":\"1555125000000\",\"StartTime\":\"1555122600000\",\"ClassID\":40231429,\"Data\":{\"stageEnd\":{\"5723892\":{\"UpCount\":3,\"DownCount\":0,\"DownTotal\":0,\"UpTotal\":401}},\"handsupEnd\":{\"5723892\":{\"Total\":2,\"CTime\":2}},\"inoutEnd\":{\"5723892\":{\"Details\":[{\"Type\":\"In\",\"Device\":1,\"Time\":1555122543},{\"Type\":\"Out\",\"Time\":1555122622},{\"Type\":\"In\",\"Device\":1,\"Time\":1555123399},{\"Type\":\"Out\",\"Time\":1555123444},{\"Type\":\"In\",\"Device\":1,\"Time\":1555123458},{\"Type\":\"Out\",\"Time\":1555123735}],\"Total\":401,\"Identity\":1}}},\"Cmd\":\"End\",\"_id\":\"5cb15363b9576da04bce2a82\",\"TimeStamp\":1555125691,\"SID\":2642110}";
            jsonStr = "{\"ActionTime\":1555592792,\"CourseID\":9289097,\"SafeKey\":\"51728dbb0bb93fc4ae7140826cc7ffad\",\"CloseTime\":\"1555592700000\",\"StartTime\":\"1555588800000\",\"ClassID\":40166263,\"Data\":{\"kickoutEnd\":{\"6899010\":[{\"Duration\":0,\"Time\":1555591823}]},\"responderEnd\":{\"Persons\":{\"6893866\":{\"SCount\":0,\"Count\":1},\"6885136\":{\"SCount\":1,\"Count\":1}},\"Count\":1},\"stageEnd\":{\"6899010\":{\"UpCount\":18,\"DownCount\":16,\"DownTotal\":452,\"UpTotal\":3074},\"6887818\":{\"UpCount\":14,\"DownCount\":13,\"DownTotal\":390,\"UpTotal\":2539},\"6798010\":{\"UpCount\":15,\"DownCount\":14,\"DownTotal\":420,\"UpTotal\":2894},\"6893866\":{\"UpCount\":15,\"DownCount\":14,\"DownTotal\":391,\"UpTotal\":3204},\"6887524\":{\"UpCount\":15,\"DownCount\":14,\"DownTotal\":404,\"UpTotal\":2796},\"6885136\":{\"UpCount\":19,\"DownCount\":12,\"DownTotal\":313,\"UpTotal\":2949},\"5680270\":{\"UpCount\":0,\"DownCount\":1,\"DownTotal\":2252,\"UpTotal\":0},\"6900876\":{\"UpCount\":14,\"DownCount\":14,\"DownTotal\":398,\"UpTotal\":2594},\"3832364\":{\"UpCount\":1,\"DownCount\":0,\"DownTotal\":0,\"UpTotal\":3533}},\"sharewidgetEnd\":{\"Total\":3455,\"Count\":2,\"Files\":[{\"EndTime\":1555589196,\"FileName\":\"西游记 10-标清_超清.mp4\",\"StartTime\":1555588991},{\"EndTime\":1555591582,\"FileName\":\"四五年级体验课图片版最新版.pptx\",\"StartTime\":1555588332}]},\"authorizeEnd\":{\"6899010\":{\"Total\":0,\"Count\":0},\"6887818\":{\"Total\":0,\"Count\":0},\"6798010\":{\"Total\":0,\"Count\":0},\"6893866\":{\"Total\":0,\"Count\":0},\"6887524\":{\"Total\":0,\"Count\":0},\"6885136\":{\"Total\":201,\"Count\":1},\"5680270\":{\"Total\":0,\"Count\":0},\"6900876\":{\"Total\":0,\"Count\":0},\"3832364\":{\"Total\":0,\"Count\":0}},\"handsupEnd\":{\"6899010\":{\"Total\":6,\"CTime\":105},\"6887818\":{\"Total\":22,\"CTime\":5},\"6798010\":{\"Total\":2,\"CTime\":2876},\"6893866\":{\"Total\":234,\"CTime\":215},\"6887524\":{\"Total\":6,\"CTime\":1633},\"6885136\":{\"Total\":78,\"CTime\":492},\"6900876\":{\"Total\":4,\"CTime\":657}},\"inoutEnd\":{\"6899010\":{\"Details\":[{\"Type\":\"In\",\"Device\":4,\"Time\":1555588230},{\"Type\":\"Out\",\"Time\":1555588242},{\"Type\":\"In\",\"Device\":4,\"Time\":1555588255},{\"Type\":\"Out\",\"Time\":1555589067},{\"Type\":\"In\",\"Device\":4,\"Time\":1555589085},{\"Type\":\"Out\",\"Time\":1555589389},{\"Type\":\"In\",\"Device\":4,\"Time\":1555589393},{\"Type\":\"Out\",\"Time\":1555590022},{\"Type\":\"In\",\"Device\":4,\"Time\":1555590041},{\"Type\":\"Out\",\"Time\":1555590954},{\"Type\":\"In\",\"Device\":4,\"Time\":1555590967},{\"Type\":\"Out\",\"Time\":1555591823}],\"Total\":3526,\"Identity\":1},\"6887818\":{\"Details\":[{\"Type\":\"In\",\"Device\":4,\"Time\":1555588688},{\"Type\":\"Out\",\"Time\":1555591617}],\"Total\":2929,\"Identity\":1},\"6798010\":{\"Details\":[{\"Type\":\"In\",\"Device\":4,\"Time\":1555588450},{\"Type\":\"Out\",\"Time\":1555591764}],\"Total\":3314,\"Identity\":1},\"6893866\":{\"Details\":[{\"Type\":\"In\",\"Device\":4,\"Time\":1555588219},{\"Type\":\"Out\",\"Time\":1555591814}],\"Total\":3595,\"Identity\":1},\"6887524\":{\"Details\":[{\"Type\":\"In\",\"Device\":4,\"Time\":1555588577},{\"Type\":\"Out\",\"Time\":1555590622},{\"Type\":\"In\",\"Device\":4,\"Time\":1555590650},{\"Type\":\"Out\",\"Time\":1555591805}],\"Total\":3200,\"Identity\":1},\"6885136\":{\"Details\":[{\"Type\":\"In\",\"Device\":4,\"Time\":1555588221},{\"Type\":\"Out\",\"Time\":1555588274},{\"Type\":\"In\",\"Device\":4,\"Time\":1555588542},{\"Type\":\"Out\",\"Time\":1555588828},{\"Type\":\"In\",\"Device\":4,\"Time\":1555588850},{\"Type\":\"Out\",\"Time\":1555589596},{\"Type\":\"In\",\"Device\":4,\"Time\":1555589602},{\"Type\":\"Out\",\"Time\":1555590581},{\"Type\":\"In\",\"Device\":4,\"Time\":1555590585},{\"Type\":\"Out\",\"Time\":1555590609},{\"Type\":\"In\",\"Device\":4,\"Time\":1555590612},{\"Type\":\"Out\",\"Time\":1555591062},{\"Type\":\"In\",\"Device\":4,\"Time\":1555591065},{\"Type\":\"Out\",\"Time\":1555591367},{\"Type\":\"In\",\"Device\":4,\"Time\":1555591371},{\"Type\":\"Out\",\"Time\":1555591793}],\"Total\":3262,\"Identity\":1},\"5680270\":{\"Details\":[{\"Type\":\"In\",\"Device\":0,\"Time\":1555590448},{\"Type\":\"Out\",\"Time\":1555592700}],\"Total\":2252,\"Identity\":194},\"6900876\":{\"Details\":[{\"Type\":\"In\",\"Device\":0,\"Time\":1555588796},{\"Type\":\"Out\",\"Time\":1555591788}],\"Total\":2992,\"Identity\":1},\"3832364\":{\"Details\":[{\"Type\":\"In\",\"Device\":0,\"Time\":1555588294},{\"Type\":\"Out\",\"Time\":1555591827}],\"Total\":3533,\"Identity\":3}},\"awardEnd\":{\"6899010\":{\"Total\":1},\"6887818\":{\"Total\":1},\"6798010\":{\"Total\":1},\"6893866\":{\"Total\":6},\"6887524\":{\"Total\":1},\"6885136\":{\"Total\":6},\"6900876\":{\"Total\":1}},\"muteEnd\":{\"MuteAll\":{},\"Persons\":{\"6899010\":{\"Total\":3074},\"6887818\":{\"Total\":2539},\"6798010\":{\"Total\":2894},\"6893866\":{\"Total\":3204},\"6887524\":{\"Total\":2796},\"6885136\":{\"Total\":2949},\"5680270\":{\"Total\":0},\"6900876\":{\"Total\":625},\"3832364\":{\"Total\":3533}}}},\"Cmd\":\"End\",\"_id\":\"5cb87658058a6f1446014c2a\",\"TimeStamp\":1555593393,\"SID\":2642110}";
            tangLangParams.put("type", "end");
            tangLangParams.put("secretKey", "2642110");
            tangLangParams.put("companyId", "3016");
            tangLangParams.put("jsonStr", jsonStr);
            JSONObject resultStr = TangLangUtil.sendRequestToTangLang("http://api.n4.bjmantis.net/api/classIn/accessClassTime", tangLangParams);
            System.err.println(resultStr.toString());
        } catch (Exception e) {
            LogUtil.error(e);
        }
    }
}
